<?php
function includeFile($file_name){
   $dir = array('./', 'include/','include/php/','include/class/','include/css/','include/js/','include/calen/','include/calen/lang/','include/tiny_mce/','include/tiny_mce/plugins/tinybrowser/','include/PHPMailer/');    //<-- put here your website directory you want to include
   $level = array('', '/', '../', '../../','../../../');    //<-- you can add more deep level in this array
   $ini_path = array();
   
   foreach($dir as $p){
      foreach($level as $l){
         $file = $l.$p.$file_name;       
         if(file_exists($file)){
			return $file;
         }       
      }   
   }
}
$adiact_lib_inc = includeFile("adiact.lib.inc.php"); 
$aut_class_inc = includeFile("aut.class.inc.php");
$global_inc = includeFile("global.inc.php"); 
$param_inc = includeFile("param.inc.php");
$mens_inc = includeFile("mens.inc.php");
 
require($adiact_lib_inc);
require($aut_class_inc);
require($global_inc);
require($param_inc);
require($mens_inc);
session_start(); //Iniciamos session para verificar si la variable esta definida
if($_SESSION["Aut"]){
	$objeto = extrac_sesion();
}
$db = new CConex($host,$user,$pass,$db,0,0); //Establecemos la conexion 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ADIACT</title>
<script type="text/javascript" src="<?php echo includeFile("jquery-1.3.2.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("acciones.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("adiact_biblio.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("jquery.fancybox.js")."?v=2.0.6";?>"></script>
<link href="<?php echo includeFile("jquery.fancybox.css")."?v=2.0.6";?>" rel="stylesheet" type="text/css" />
<link href="<?php echo includeFile("panel.css");?>" rel="stylesheet" type="text/css" />
<link href="<?php echo includeFile("modulos.css");?>" rel="stylesheet" type="text/css" />
<link href="<?php echo includeFile("portada.css");?>" rel="stylesheet" type="text/css" />
<style type="text/css">@import url(<?php echo includeFile("calendar-blue2.css");?>);</style>
<script type="text/javascript" src="<?php echo includeFile("calendar.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("calendar-es.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("calendar-setup.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("tiny_mce.js");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("tb_tinymce.js.php");?>"></script>
<script type="text/javascript" src="<?php echo includeFile("edit_tinymce.js");?>"></script>
</head>
<body><br/>